package GHM;

import java.util.HashMap;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
public class Main implements ApplicationListener{
	private State activeState;
	private HashMap<Integer, State> stateList = new HashMap<Integer,State>();
	public void create() {
		new StaticTextures();
		new StaticTextures_Walls();
		Gdx.graphics.setVSync(true);
		stateList.put(1,new Game(this));
		activeState = stateList.get(1);
		activeState.enter();
	}
	
	public State getState(int id) {
		return stateList.get(id);
	}

	public void setState(int id) {
		activeState.leave();
		stateList.get(id).enter();
		activeState = stateList.get(id);
	}
	
	public void dispose() {
	}
	public void pause() {
	}

	public void render() {
		GL10 gl = Gdx.graphics.getGL10();
		gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		activeState.update();
		activeState.render(); 
	}

	public void resize(int width, int height) {
	}

	public void resume() {

	}
}